﻿Imports DAO
Imports DTO
Public Class PhieuNhapBUS
    Dim PN As New PhieuNhapDAO
    Function LayTTPN() As DataTable
        Dim dtpn As New DataTable
        dtpn = PN.LoadPN()
        Return dtpn
    End Function

    Public Shared Function LAYTHEIID(ByVal id As Integer) As PhieuNhapDTO
        Dim pnDAO As New PhieuNhapDAO()
        Return pnDAO.LayTheoID(id)
    End Function


    Public Shared Function LAYTATCA() As IList
        Dim pnDAO As New PhieuNhapDAO()
        Return pnDAO.LayTatCa()
    End Function


    Public Shared Function LAYTATCATT() As DataTable
        Dim pnDAO As New PhieuNhapDAO()
        Return pnDAO.LayTatCaTT()
    End Function


    Public Shared Sub THEM(ByVal pn As PhieuNhapDTO)
        Dim pnDAO As New PhieuNhapDAO()
        pnDAO.Them(pn)
    End Sub

    Public Shared Sub CAPNHAP(ByVal pn As PhieuNhapDTO)
        Dim pnDAO As New PhieuNhapDAO()
        pnDAO.CapNhap(pn)
    End Sub


    Public Shared Sub XOA(ByVal id As Integer)
        Dim pnDAO As New PhieuNhapDAO()
        pnDAO.Xoa(id)
    End Sub


End Class
